﻿<%@ Page Language="C#" ValidateRequest="false" Inherits="FrontBasePage" %>
<%@ Import Namespace="Whir.Framework" %>
<%@ Import Namespace="Whir.Service" %>
<%@ Import Namespace="Whir.Label" %>
<script type="text/C#" runat="server">
/*

 *描述： 本文件由ezEIP模板发布引擎生成，请勿直接更改此文件！！ 

 *模板路径：C:\Z_中濠酒店集团（深圳）有限公司\pc\template\联系我们.shtml

 *生成时间：2020-06-18 17:20:27

 */

public Whir.Domain.Column PageColumn ; 
public Whir.Domain.SiteInfo PageSiteInfo ; 
public string columnid=""; 
protected void Page_Load(object sender, EventArgs e){
    columnid=Server.UrlDecode(RequestUtil.Instance.GetQueryString("columnid"));

 
    PageColumn = ServiceFactory.ColumnService.SingleOrDefault<Whir.Domain.Column>(124);
    PageSiteInfo = ServiceFactory.SiteInfoService.SingleOrDefault<Whir.Domain.SiteInfo>(2);
    Whir.Label.LabelHelper.Instance.SerColumnAndSiteInfoToChildControl(this, PageSiteInfo, PageColumn); 
    DataBind();
}
</script><!DOCTYPE html>
<html lang="zh-cn">
<head>
<!-- head Start-->
<wtl:include runat="server"      filename="head.html"></wtl:include>
<!-- head end -->
<wtl:Menu runat="server"  columnid='<%#PageColumn.ColumnId.ToInt()%>' OnlyOne="true"><ItemTemplate>
<script type="text/javascript">
   //定义栏目ID
   var navID = '<%# Container.DataRow["ColumnId"].ToReplace() %>';
</script>
</ItemTemplate></wtl:Menu>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=IDvNBsejl9oqMbPF316iKsXR"></script>
</head>
<body>
<!--top-->
<wtl:include runat="server"       filename="top.html"></wtl:include>
<!--top End-->
<div class="Banner">
	<!--banner-->
	<wtl:include runat="server"      filename="banner.html"></wtl:include>
	<!--banner End-->
	<!--top-->
	<wtl:include runat="server"      filename="title.html"></wtl:include>
	<!--top End-->
</div>
<script>
var wh=$(window).outerHeight(true);
$('.Banner').height($(window).outerHeight(true));
setTimeout(function(){
	$('.Banner').addClass('active');	
},300);
</script>
<!-- banner -->
<div class="Main Us">
	<div class="Usbg">
		<div class="usBox">
			<div class="w1200 Pfsc">
				<div class="mapselect">
					<div class="ZJselectBox">
						<div class="ZJselectTxt">
							<span></span>
							<i class="icon"></i>
						</div>
						<div class="ZJselectUl">
							<div class="ZJselectUlBox">
								<ul class="ul">
									<wtl:list runat="server"  nulltip="暂无记录" needpage="false" where="IsDel=0" order="sort desc,createdate desc"><ItemTemplate>
									<li data-x='<%# Container.DataRow["Longitude"].ToReplace() %>' data-y='<%# Container.DataRow["Latitude"].ToReplace() %>'> 
									    <h1 class="h1"><%# Container.DataRow["Title"].ToReplace() %></h1>
									    <div class="hide">
									    	<div class="item">
									    		<h4 class="h4">定位：</h4>
									    		<div class="txt">
									    			<%# Container.DataRow["Note"].ToReplace() %>
									    		</div>
									    	</div>
									    	<div class="item">
									    		<h4 class="h4">地址：</h4>
									    		<div class="txt"><%# Container.DataRow["Address"].ToReplace() %></div>
									    	</div>	
									    	<div class="item">
									    		<h4 class="h4">电话：</h4>
									    		<div class="txt tel"><%# Container.DataRow["Phone"].ToReplace() %></div>
									    	</div>	
									    	<div class="item">
									    		<h4 class="h4">传真：</h4>
									    		<div class="txt"><%# Container.DataRow["Fax"].ToReplace() %></div>
									    	</div>	
									    </div>
									</li>
									</ItemTemplate></wtl:list>
								</ul>
							</div>
						</div>
					</div>
					<div class="mapselectBox">

					</div>

				</div>
				<div class="mapbox">
					<div id="allMap"></div>
				</div>
				
				<div class="clear"></div>
			</div>

		</div>
	</div>
</div>
<script>
$('.ZJselectBox').each(function(i) {
	var _this=$(this);
	var spantxt=_this.find('.ZJselectTxt span').text();
	_this.find('.ZJselectTxt').click(function(enevt) {

		 $('.ZJselectBox').not( $('.ZJselectBox').eq(i) ).find('.ZJselectUl').stop(true).slideUp();
		_this.find('.ZJselectUl').stop(true).slideToggle();
		$(this).find('.icon').toggleClass('iconOn');

		$('.ZJselectBox').not( $('.ZJselectBox').eq(i) ).find('.icon').removeClass('iconOn');
		enevt.stopPropagation();

	});
	_this.find('.ZJselectUlBox ul li').click(function(enevt){
			var txt=$(this).find('.hide').html();
			$('.mapselect .mapselectBox').empty();
			$('.mapselect .mapselectBox').append(txt);
			_this.find('.ZJselectTxt span').text( $(this).find('.h1').text() );
			_this.find('.ZJselectUl').stop(true).slideUp();
			$('.ZJselectBox .icon').removeClass('iconOn');
			enevt.stopPropagation();
	});

	_this.find('.ZJselectTxt .iconclose').click(function(enevt){

		$('.ZJselectBox').not( $('.ZJselectBox').eq(i) ).find('.ZJselectUl').stop(true).slideUp();
		_this.find('.ZJselectUl').stop(true).slideDown();
		_this.find('.ZJselectTxt span').text(spantxt);
		enevt.stopPropagation();

	})
	
});

$(document).click(function() {
	$('.ZJselectBox .ZJselectUl').stop(true).slideUp();
	$('.ZJselectBox .icon').removeClass('iconOn');
});

  $(".mapselect .ul li").click(function(e) {
	  $(this).addClass("on");
	  $(this).siblings().removeClass("on");
	  
	  var dataX=$(this).attr("data-x");
	  var dataY=$(this).attr("data-y");
	  var tit=$(this).find(".h1").text();
	  // var add="";
	  var add='电话：'+$(this).find(".hide .tel").html();

	// 百度地图API功能
	var map = new BMap.Map("allMap");
	var point = new BMap.Point(dataX,dataY);
	var marker = new BMap.Marker(point);  // 创建标注
	map.addOverlay(marker);              // 将标注添加到地图中
	map.centerAndZoom(point, 15);
	// map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用

	var opts = {
	  width : 200,     // 信息窗口宽度
	  height: 60,     // 信息窗口高度
	  title : tit , // 信息窗口标题
	  enableMessage:true//设置允许信息窗发送短息
	}
	var infoWindow = new BMap.InfoWindow(add, opts);  // 创建信息窗口对象 

	marker.addEventListener("click", function(){          
		map.openInfoWindow(infoWindow,point); //开启信息窗口
	});
	map.openInfoWindow(infoWindow,point); //开启信息窗口

});


  $(".mapselect .ul li").eq(0).click()

</script>
<!--bottom-->
<wtl:include runat="server"       filename="bottom.html"></wtl:include>
<!--bottom End-->
</body>
</html>